import { service } from '@/common/tools/luch-request/index.js';

export function login(data) {
    return service.request({
            url: '/applet/UserLogin/login',
            method: 'post',
            data,
            noAuth: true,
            count: 0
        }
    )
}

export function decodeTelephone(data) {
    return service.request({
            url: '/applet/User/decodeTelephone',
            method: 'post',
            data
        }
    )
}

//微信用户初次设置余额支付密码和修改余额支付密码
export function changePaymentCode(data) {
    return service.request({
            url: '/applet/User/changePaymentCode',
            method: 'post',
            data
        }
    )
}

//查询用户信息
export function getUserInfo(params) {
    return service.request({
        url: '/applet/User/getUserInfo',
        method: 'get',
        params
    })
}

//查询地区信息列表
export function getAreaInfoList(params) {
    return service.request({
        url: '/applet/Area/getAreaInfoList',
        method: 'get',
        params,
		noAuth: true
    })
}

//用户更换绑定地区
export function changeBindingArea(params) {
    return service.request({
        url: '/applet/Area/changeBindingArea',
        method: 'get',
        params
    })
}

//获取用户绑定地区信息
export function getBindingAreaInfo(params) {
    return service.request({
        url: '/applet/Area/getBindingAreaInfo',
        method: 'get',
        params
    })
}

//查询动态菜单和统计菜单数字小标
export function getDynamicMenuStatisticsNum(params) {
    return service.request({
        url: '/applet/User/getDynamicMenuStatisticsNum',
        method: 'get',
        params,
		noAuth: true,
    })
}

// 检查用户是否发送客服消息以及剩余客服消息次数是否为0
export function checkWechatUserCustomerMessage() {
    return service.request({
        url: '/applet/User/checkWechatUserCustomerMessage',
        method: 'get',
		noAuth: true,
    })
}
